package cn.fboost.mtos.dto.request;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.PositiveOrZero;

/**
 * 商品分类更新请求
 */
@Data
public class CategoryUpdateRequest {
    @NotNull(message = "分类ID不能为空")
    @Positive(message = "分类ID有误")
    private Integer id;

    @Length(min = 1, message = "分类名称不能为空")
    private String name;

    @PositiveOrZero(message = "排序值有误")
    private Integer sort;
}
